<template>
  <router-view></router-view>
  <van-tabbar v-model="getData().active">
    <van-tabbar-item icon="home-o" to="/home">首页</van-tabbar-item>
    <van-tabbar-item icon="location-o" to="/volunteer">志愿周边</van-tabbar-item>
    <van-tabbar-item icon="gift-o" to="/welfare">福利中心</van-tabbar-item>
    <van-tabbar-item icon="shop-o" to="/shop">积分商城</van-tabbar-item>
    <van-tabbar-item icon="friends-o" to="/my">我的</van-tabbar-item>
  </van-tabbar>
</template>
  
<script>
import { Tabbar, TabbarItem } from "vant";
import { ref } from "vue";

export default {
  components: {
    [Tabbar.name]: Tabbar,
    [TabbarItem.name]: TabbarItem,
  },
};
</script>

<script setup>
const active = ref(0);

const getData = () => {
  return { active };
};
</script>